<?php
use common\components\widgets\Datetimepicker;
Datetimepicker::widget(['timepicker' => 'false','format'=>'Y-m-d']);
?>
<?php $form = \yii\widgets\ActiveForm::begin(['enableAjaxValidation' => true,'enableClientValidation' => false,'options'=>['class'=>'form-validate']]); ?>
<table width="100%" class="table-form">
    <tr>
        <th class="zx-goods-table"><?= $model->attributeLabels()['username']; ?></th>
        <td><?= $form->field($model, 'username', ['template' => '{input}{error}{hint}'])->textInput(['class'=>'input-text']) ?></td>
    </tr>
    <tr>
        <th class="zx-goods-table"><?= $model->attributeLabels()['name']; ?></th>
        <td><?= $form->field($model, 'name', ['template' => '{input}{error}{hint}'])->textInput(['class'=>'input-text']) ?></td>
    </tr>
    <tr>
        <th class="zx-goods-table"><?= $model->attributeLabels()['email']; ?></th>
        <td><?= $form->field($model, 'email', ['template' => '{input}{error}{hint}'])->textInput(['class'=>'input-text']) ?></td>
    </tr>
    <tr>
        <th class="zx-goods-table"><?= $model->attributeLabels()['password']; ?></th>
        <td><?= $form->field($model, 'password', ['template' => '{input}{error}{hint}'])->passwordInput(['class'=>'input-text']) ?></td>
    </tr>
    <tr>
        <th class="zx-goods-table"><?= $model->attributeLabels()['password_r']; ?></th>
        <td><?= $form->field($model, 'password_r', ['template' => '{input}{error}{hint}'])->passwordInput(['class'=>'input-text']) ?></td>
    </tr>
    <tr id="is_delay">
        <th class="zx-goods-table"><?= $model->attributeLabels()['status']; ?></th>
        <td><?= $form->field($model, 'status', ['template' => '{input}{error}{hint}'])->radioList(['1'=>'激活', '2'=>'禁用'],['class'=>'input-text']) ?></td>
    </tr>
</table>
<div class="m_top_10 btn" style="display: none">
    <?= \yii\helpers\Html::submitButton('提交', ['class' => "button", 'id' => 'dosubmit']) ?>
</div>
<?php \yii\widgets\ActiveForm::end(); ?>
<?php
$js =<<<JS
   // $(document).on('change','#admin-role',function(){
   //     var tole = $(this).val();
   //     if(tole === 'mechanic' || tole === 'mec_principal'){
   //         $('#mechanic_id').css('display','');
   //         $('#type_id').css('display','none');
   //     }else if (tole === 'category'){
   //         $('#mechanic_id').css('display','none');
   //         $('#type_id').css('display','');
   //     }else {
   //          $('#mechanic_id').css('display','none');
   //         $('#type_id').css('display','none');
   //     }
   // });
JS;
\Yii::$app->view->registerJs($js);
?>
